package com.common;

public class BaseContext {
    //通过同一http请求线程相同的规则，获取设置当前操作者的id，并给自动填充字段提供get方法
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
